.deploy-checklist {
  list-style-type: none;
  padding: 0;
  margin-top: 1.5rem;
}

.deploy-checklist__item {
  margin-bottom: 1rem;
  display: flex;
}

.variables-header {
  margin: 1rem 0;
  padding-top: 1rem;
}

.variables-fields {
  input, select {
    display: inline-block;
    width: inherit;
    margin-right: 1rem;
  }
}

.deploy-checklist__item__label {

}

.deploy-checklist__item__checkbox {
  margin-right: 1rem;
  flex-shrink: 0;
}

.action-button {
  margin: 0 0.5rem;

  display: none;
  &[data-status="running"],
  &[data-status="aborting"],
  &[data-status="pending"] {
    display: inline-block;
  }

  .caption--pending {
    display: none;
  }

  &.pending {
    .deploy-action {
      cursor: default;
    }
    .caption--ready {
      display: none;
    }
    .caption--pending {
      display: inline;
    }
  }
}

.task-output-container.task-output-container-main-page {
  height: calc(100vh - 9rem - 4rem - 1px); // .header and .deploy-banner. -1px is to floor the result
}

.output-line {
  height: 1.5rem;
}

.deploy-banner {
  min-height: 4rem;
  height: auto;
  background-color: #f0f4f7;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  flex-wrap: wrap;
  overflow-x: hidden;

  .deploy-banner-section {
    display: inline-block;
    padding: .75rem 1.5rem;
  }

  .stack-link {
    display: none;
  }

  .action-buttons {
    flex: none;
  }

  .deploy-banner-status {
    height: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
  }

  &[data-status="failure"],
  &[data-status="error"],
  &[data-status="timedout"] {
    .deploy-banner-status {
      background-color: $bright-red;
      width: 100%;
    }
  }

  &[data-status="aborted"],
  &[data-status="flapping"] {
    .deploy-banner-status {
      background-color: $orange;
      width: 100%;
    }
  }

  &[data-status="success"] .deploy-banner-status {
    background-color: $green;
    width: 100%;
  }

  &[data-status="pending"] .deploy-banner-status,
  &[data-status="running"] .deploy-banner-status {
    background-color: $blue;
    width: 0%;
    z-index: 9999;
    -webkit-animation: loading-slide 1.2s linear infinite;
  }

  &[data-status="aborting"] .deploy-banner-status {
    background-color: $orange;
    width: 0%;
    z-index: 9999;
    -webkit-animation: loading-slide 1.2s linear infinite;
  }

  .deploy-status {
    color: #8f9498;
  }
  .short-sha {
    background: #e6eaed;
    font-family: Menlo, monospace;
    color: #9cacbb;
    border-radius: 4px;
    font-size: .875rem;
    padding: .25em .45em;
  }

  .short-sha-no-bg {
    font-family: Menlo, monospace;
    border-radius: 4px;
    font-size: .875rem;
  }
}

.search-bar {
  background-color: #f0f4f7;
  border: 1px solid #f0f4f7;
  position: absolute;
  right: 0px;
  padding: .125rem;
  border-bottom-left-radius: .25rem;

  input[type="search"] {
    width: 300px;
  }
}

@include keyframes(loading-slide) {
  0% { width: 0%; left: 0%; }
  30% {  left: 0%; }
  100% { width: 50%; left: 100%; }
}

.code-preview {
  margin: 1.5rem 0;
}

.sidebar.enabled + .deploy-main {
  margin-left: 300px;
}

.sidebar {
  background-color: $slate;
  color: white;
  overflow: hidden;
  height: calc(100vh - 9rem - 1px); // .header. -1px is to floor the result
  position: absolute;
  width: 0px;
  &.enabled {
    width: 300px;
  }
}

.sidebar-plugins {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.commit-checks {
  border: .25rem solid $terminal-black;
  &[data-status="success"] {
    border-color: $green;
  }

  &[data-status="failed"],
  &[data-status="failure"],
  &[data-status="error"],
  &[data-status="timedout"] {
    border-color: $bright-red;
  }

  &[data-status="pending"],
  &[data-status="running"] {
    border-color: $dark-yellow;
  }
}

.monitoring-panel {
  display: inline-block;
  iframe {
    border: none;
  }
}

.ignored-safeties {
  color: $orange;
}

.deploy-actions {
  flex-shrink: 0;

  @include media(desktop) {
    margin-left: 1rem;
    min-width: 12rem;

    .btn {
      float: right;
    }
  }
}

.release-validation {
  display: inline-block;
  .icon {
    background-color: #ddd;
  }

  &:hover .icon {
    background-color: darken(#ddd, 20%);
  }
}

.deploy[data-release-status="success"] .release-validation .action-validate-release,
.deploy[data-release-status="failure"] .release-validation .action-reject-release {
  &:before, &:after {
    display: none; // Hide tooltips
  }
  .icon {
    background-color: #ddd;
  }
}

.deploy .commit-lock {
  .icon {
    background-color: $bright-red;
  }

  &:hover .icon {
    background-color: darken($bright-red, 20%);
  }

  .action-lock-commit {
    display: none;
  }

  .action-unlock-commit {
    display: inline-block;
  }
}
